<?php
include(dirname(__FILE__)."/inc/taobaoCom.php");
$nick = filter_input(INPUT_GET,'nick');
if (!$nick)
{
	header("Location:/");
}else
{
	$class = new taobaoCom();
	$shopInfo = $class->getShopInfo($nick);
	$shopTaokeInfo = $class->getTaokeShopInfo($shopInfo[0]['sid']);
	if ($shopTaokeInfo[0]['click_url'])
	{
		header("Location:".$shopTaokeInfo[0]['click_url']);
	}else
	{
		header("Location:http://store.taobao.com/shop/view_shop-".$shopInfo[0]['sid'].".htm");
	}
}